fix portability issues that led to Hurd build failures
authorDebian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Thu, 16 Oct 2025 21:24:56 +0000 (17:24 -0400)
committerAaron M. Ucko <ucko@debian.org>
Thu, 16 Oct 2025 21:24:56 +0000 (17:24 -0400)
* src/build-system/configure(.ac):
  - Reflect the Hurd's support for -Wl,rpath,... .
* src/connect/ncbi_socket_cxx.cpp, src/connect/ext/ncbi_localnet.c:
  cope with missing PATH_MAX everywhere, not just under Windows.

Author: Aaron M. Ucko <ucko@debian.org>
Last-Update: 2020-09-19

Gbp-Pq: Name hurd_fixes

c++/src/build-system/configure
c++/src/build-system/configure.ac
c++/src/connect/ncbi_localip.c
c++/src/connect/ncbi_socket_cxx.cpp

index 237353c1be2d42605cd986c24f122c795360f0ca..4a45de55295f28e77b30fbba588a0a28a11a13a0 100755 (executable)
@@ -10946,7 +10946,7 @@ if test -z "$CONF_f_runpath" ; then
       CONF_f_runpath="-R"
       ;;
     linux*:[GI]CC | linux*Clang | *bsd*:GCC | *bsd*Clang | cygwin*:GCC \
-    | osf*:GCC )
+    | osf*:GCC | gnu*:GCC )
       CONF_f_runpath="-Wl,-rpath,"
       ;;
     irix*:* | linux*:KCC | *:Compaq )
index 67244eb73e7a791d623ff662180fbff40059ea16..0e5fcd08118067dfac696714abfb1ec9d4917717 100644 (file)
@@ -2470,7 +2470,7 @@ if test -z "$CONF_f_runpath" ; then
       CONF_f_runpath="-R"
       ;;
     linux*:[[GI]]CC | linux*Clang | *bsd*:GCC | *bsd*Clang | cygwin*:GCC \
-    | osf*:GCC )
+    | osf*:GCC | gnu*:GCC )
       CONF_f_runpath="-Wl,-rpath,"
       ;;
     irix*:* | linux*:KCC | *:Compaq )
index a021d89e6322e4722c50ef9cb138345bb2b63126..d9c8120f10f05115aea18cb2f6f2a348b7bd862a 100644 (file)
@@ -68,7 +68,7 @@
 #  define INADDR_LOOPBACK  0x7F000001
 #endif /*!INADDR_LOOPBACK*/
 
-#if defined(NCBI_OS_MSWIN)  &&  !defined(PATH_MAX)
+#if /* defined(NCBI_OS_MSWIN)  && */ !defined(PATH_MAX)
 #  ifdef _MAX_PATH
 #    define PATH_MAX  _MAX_PATH
 #else
index 9b65865674576e670ae2b5e688b7730b387d0533..b1d7ce9e10f91ac7d8e3b3a20e4e3bb96ff63f08 100644 (file)
@@ -35,7 +35,7 @@
 #include "ncbi_assert.h"                // no _ASSERT()s, keep clean from xncbi
 #include <connect/ncbi_socket_unix.hpp>
 #include <limits.h>                     // for PATH_MAX
-#if defined(NCBI_OS_MSWIN)  &&  !defined(PATH_MAX)
+#ifndef PATH_MAX
 #  define PATH_MAX 512                  // will actually use less than 32 chars
 #endif // NCBI_OS_MSWIN && !PATH_MAX